package br.edu.ufcg.lp2;

import java.util.Comparator;


/**
 * This class implements the interface Comparator and compares two names in
 * alphabetical order.
 * 
 * @author João Pedro Leôncio <joopeeds@gmail.com>
 * @author Franco Stefano <stefano.tejo@gmail.com>
 * @author Fellype Cavalcante <fellype.cavalcante@gmail.com>
 */


public class NameComparator implements Comparator<Name> {

	
	
	/**
	 * 
	 * @param o1
	 * 		The name
	 * @param 02
	 * 		Other name
	 * @return
	 * 		The name in alphabetical order
	 */	
	
	@Override
	public int compare(Name o1, Name o2) {
		return o1.getName().compareTo(o2.getName());
	}

}
